package control

import (
	"net/http"

	"github.com/gorilla/websocket"
)

type login struct{
	Usrname string `json:"usr"`
	Pass string `json:"pass"`
}

type SetupRoom struct{
	RoomId string `json:"RoomId"`
}

type SetupGame struct{
	RoomId string `json:"RoomId"`
	Uuid string `json:"Uuid"`
}

type Wmessage struct{
	Order uint8 `json:"order"`
	Data string `json:"data"`
}

//websocket升级
var upgrader = websocket.Upgrader{
	ReadBufferSize:  1024,
	WriteBufferSize: 1024,
	CheckOrigin: func(r *http.Request) bool {
		return true // 允许跨域（生产环境应限制特定域名）
	},
}

